package com.eastfair.pay.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.boot.service.SuperService;
import com.eastfair.pay.dto.TransactionDTO;
import com.eastfair.pay.dto.TransactionPageQuery;
import com.eastfair.pay.entity.Transaction;
import com.eastfair.pay.vo.TransactionStatisticsVO;
import com.eastfair.pay.vo.TransactionVO;

import java.util.List;

/**
 * <p>
 * 业务接口
 * 交易记录
 * </p>
 *
 * @author clm
 * @date 2023-02-13
 */
public interface TransactionService extends SuperService<Transaction> {
    /**
     * do转vo
     * @param model
    */
    TransactionVO doToVo(Transaction model);
   /**
    * do转vo
    * @param modelList
   */
    List<TransactionVO> doToVos(List<Transaction> modelList);


   /**
    * 通用查询
    *
    * @param modelDTO DTO
    * @param ids 主键id集合
    * @return list
    */
   List<Transaction> list(TransactionDTO modelDTO, List<Long> ids);

  /**
  * 通用查询
  *
  * @param modelDTO DTO
  * @param ids 主键id集合
  * @return list
  */
  List<Transaction> listOfCache(TransactionDTO modelDTO, List<Long> ids);

  /**
   * @Author clm
   * @Description //保存更新
   * @Date 16:48 2023/2/13
   * @Param [transactionDTO]
   * @return void
   **/
    void saveOrUpdate(TransactionDTO transactionDTO);

    /**
     * @Author clm
     * @Description //交易记录分页查询
     * @Date 17:11 2023/2/13
     * @Param [params]
     * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.eastfair.pay.vo.TransactionVO>
     **/
    Page<TransactionVO> queryList(PageParams<TransactionPageQuery> params);

    /**
     * @Author clm
     * @Description //交易记录 统计
     * @Date 9:32 2023/2/16
     * @Param [params]
     * @return java.util.List<com.eastfair.pay.vo.TransactionStatisticsVO>
     *
     * @param param*/
    List<TransactionStatisticsVO> getTransactionStatisticsInfo(TransactionDTO param);

    /**
     * @Author clm
     * @Description //保存
     * @Date 14:12 2023/2/17
     * @Param [transactionDTO]
     * @return void
     **/
    void save(TransactionDTO transactionDTO);

    /**
     * @Author clm
     * @Description //更新
     * @Date 14:12 2023/2/17
     * @Param [transactionDTO]
     * @return void
     **/
    void updateById(TransactionDTO transactionDTO);

    /**
     * @Author clm
     * @Description //按条件获取交易记录
     * @Date 16:32 2023/2/20
     * @Param [transactionDTO]
     * @return com.eastfair.pay.vo.TransactionVO
     **/
    List<TransactionVO> getTransactionStatistics(TransactionDTO transactionDTO);
}
